<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
</head>
<body>

<table class="tb_main">	
	<tr class="tb_title"><th colspan="14">留存率对比</th></tr>
	
	<tr class="tb_server_list">
		<th colspan="16" align="left">
			<{ foreach from=$servers_info key=key item=value }>
				<li><input type="checkbox" checked="checked" onclick="javascript:$('#server_<{ $value.server_id }>').toggle(500);" id="server<{$value.server_id}>" />
				<label for="server<{$value.server_id}>"><{$value.server_name}></label></li>
			<{/foreach}>
		</th>
	</tr>
	
	<tr>
			<td>服务器名称</td>
			<td>总注册人数(人)</td>
			<td>总创号人数(人)</td>
			<td>总创号流失率</td>
			<td>当前活跃用户数</td>
			<td>总流失率</td>
			<td>开服时间</td>
			<td>开服当日注册人数</td>
			<td>开服次日留存率</td>
			<td>开服当日创号人数</td>
			<td>首日创号流失率</td>
			<td>首日创号三日留存率</td>
			<td>首日创号七日留存率</td>
			<td>首日创号三十日留存率</td>
	</tr>
	
	<{foreach from=$servers_info key=key item=value}>
	<tr id="server_<{ $value.server_id }>">
			<td><{$value.server_name}></td>
			<td><{$value.total_users}></td>
			<td><{$value.total_charge}></td>
			<td><{$value.total_charge_users}></td>
			<td><{$value.charge_rate}>%</td>
			<td><{$value.online_users}>人</td>
			<td><{$value.total_old_users}>人</td>
			<td><{$value.day_qpoint}></td>
			<td><{$value.month_qpoint}></td>
			<td><{$value.gain_rate}></td>
			<td><{$value.starttime}></td>
			<td><{$value.start_days}>天</td>
			<td><{$value.onine_max}>/<{$value.online_avg}></td>
			<td><{$value.online_users}>/<{$value.onine_max}></td>
	</tr>
	<{/foreach}>
	
</table>

<p align="center"><{$last}></p>

<script type="text/javascript">
$(document).ready(function(){
	//表格样式
	$(".tb_main tr:odd").addClass("colorodd");
	$(".tb_main tr:even").addClass("coloreven");
	$(".tb_main tr").hover(function(){$(this).addClass("colorhover")},function(){$(this).removeClass("colorhover")});
});

function get_online_users()
{
	$.getJSON(
			'?action=online',
			{},
			function(callback)
			{
				if(callback != '')
				{
					$('#platform_online_users').text(callback);
				}
				else
				{
					var link= '<a href="#" onmouseover="get_online_users();">刷新</a>';
					$('#platform_online_users').text(link);
				}
			}
	);
}

</script>

</body>
</html>